#!/bin/sh

if [ -z "$@" ];then
	name="php"
        url="https://jenkins.xhaihua.cn/computer/$name/slave-agent.jnlp"
	secret="68c61091618e057a672a1f1f84828ccd1c72d5f1f3042bf3a5ca18bc916ed850"
	dir="/opt/app/jenkins/home"
	sudo -u jenkins java -jar /agent.jar -jnlpUrl $url -secret $secret -workDir $dir -noCertificateCheck 
else
	$@
fi
